{-# OPTIONS -Wall #-}

--------------------------------------------------------------------------------
-- |
-- Module      :  ContML.VarId
-- Copyright   :  (c) Stephen Tetley 2012
-- License     :  BSD3
--
-- Maintainer  :  stephen.tetley@gmail.com
-- Stability   :  unstable
-- Portability :  GHC
--
-- Variable ids annotated with type.
--
--------------------------------------------------------------------------------

module ContML.VarId
  (
    VarId(..)
  , ppVarId

  ) where


import ContML.Types

import Text.PrettyPrint.HughesPJ                -- package: pretty


data VarId = VarId { var_name :: String, var_type :: Type }
  deriving (Eq,Ord,Show)


ppVarId :: VarId -> Doc
ppVarId (VarId s t) = text s <+> text "::" <+> ppType t


